const projectDown = document.querySelector(".project-down");
const taskList = document.querySelector(".task-list ul li:nth-child(2)");
const box = document.querySelectorAll(".box");
projectDown.addEventListener("click", function (e) {
  if (e.target.tagName === "LI") {
    const old = document.querySelector(".projectActive");
    old && old.classList.remove("projectActive");
    e.target.classList.add("projectActive");
    console.dir(e.target);
    let key = e.target.innerHTML;
    switch (key) {
      case "任务":
        location.href = "./ylc.html";

        break;
      case "文件":
        location.href = "./ylcwenjian.html";

        break;
      case "概览":
        location.href = "./ylcgailan.html";

        break;
      case "统计":
        break;

      default:
        break;
    }
  }
});
// 概览动态交互
const release = document.querySelector(".release");
const releaseCn = document.querySelector(".releaseCn");
const releaseCn2 = document.querySelector(".releaseCn2");
const submitone = document.querySelector(".content-xianmu-left .submit");
const tx = document.querySelector(".tx");
const txAll = document.querySelectorAll(".content-xianmu-left textarea");
// console.log(submitone);
release.addEventListener("click", function () {
  releaseCn2.innerHTML = `<img
  src="https://img.axureshop.com/f2/fb/cd/f2fbcd26e8434d5488d3ef239ea2f821/images/概览动态/u3756.jpg"
  alt=""
/>
<i>鲍宝</i> 发布了<span>留言</span>
<em>刚刚</em>`;
  tx.value = "";
});
submitone.addEventListener("click", function () {
  releaseCn.innerHTML = `<img
    src="https://img.axureshop.com/f2/fb/cd/f2fbcd26e8434d5488d3ef239ea2f821/images/概览动态/u3756.jpg"
    alt=""
  />
  <i>鲍宝er</i> 更新了<span>任务</span>
  <em>刚刚</em>`;
  txAll.forEach((el) => {
    el.value = "";
  });
});
